Upgrade tooling to use uv and pyproject.toml#74
Conversation
Changed the Makefile to use a similar format to the main "tooling-trusted-releases" repo Addd the light pre-commit config. Removed the requirements.txt fixer from the standard pre-commit config. Ran all Makefile targets including `check-light` which ran ruff auto format. Start fresh by running from the root: `make sync-all`
|
Thanks. I'll test this tomorrow. |
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "pre-commit>=2.20.0", |
There was a problem hiding this comment.
I would (again) strongly suggest prek instead of pre-commit. The user experience and speed are incomparable, it uses uv to install loca virtualenv for example. There are already many serious players using prek https://github.com/j178/prek?tab=readme-ov-file#who-is-using-prek - and more every day.
If you anyway want to use pre-commit I would suggest to use pre-commit-uv to add here https://pypi.org/project/pre-commit-uv/ - this is a project that was developed by tox maintainers that is patching the pre-commit to use uv instead of pip to install local venvs for pre-commit hooks.
A bit of interesting context and examples of dramas in our ecosystem.
Unfortunatey the author of pre-commit (also author of flake8 and few other code quality tools) considers astral and uv as "bad players" who "stole his ideas" and implemented ruff from scratch replacing many other tools in python ecosystem rather than contribute back to his tools and refused to have uv as an installation option despite clear benefits (speed, caching, better reuse of installed binaries).
So tox maintainers implemented pre-commit-uv that patches installation of pre-commit and replaces pip install with uv pip install essentially.
Also just to add a little spice - the pre-commit author essentially threatened prek author j178/prek#73 and accused him (again) of stealing his ideas instead of contributing to his project, even if prek essentially was from-grounds-up rewrite in rust. Much more open to ideas of the pre-commit users, that the pre-commit author plainly refused to accept as contribution). for example auto-complete of hook names that is essentials for big users like Airflow.
We also have good relationship with prek author and he fixes issue in hours usually when we report them - and you should not be afraid of it's stability.
potiuk
left a comment
There was a problem hiding this comment.
Nice. This is really cool that you connect two workflows together !
Changed the Makefile to use a similar format to the main "tooling-trusted-releases" repo
Addd the light pre-commit config. Removed the requirements.txt fixer from the standard pre-commit config.
Ran all Makefile targets including
check-lightwhich ran ruff auto format.Start fresh by running from the root:
make sync-all